package com.ylkj.common.base;

public class ReturnParamData {
	public enum ReturnParam {
		/**
		 * 返回参数的错误编码
		 */
		SUCCESS("接口调用成功", "0"), NOFOUND("未查询到数据", "-1"), INCORRECT("接口传入参数不正确 param>>>>", "10"), SYSTEMEXCEPTION("系统异常", "20");
		// 成员变量
		private String mes;
		private String code;
		// 构造方法
		private ReturnParam(String mes, String code) {
			this.mes = mes;
			this.code = code;
		}
		// 普通方法
		public static String getName(String code) {
			for (ReturnParam c : ReturnParam.values()) {
				if (c.getCode() == code) {
					return c.mes;
				}
			}
			return null;
		}
		// get set 方法
		public String getMes() {
			return mes;
		}
		public void setMes(String mes) {
			this.mes = mes;
		}
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
	}
}
